﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TankWar
{
    enum Direction { 
        Left,Right,Up,Down
    }
    class Movething:GameObject
    {
        public int speed { get; set; }

        private Bitmap MapUp { get; set; }
        private Bitmap MapDown { get; set; }
        private Bitmap MapLeft { get; set; }
        private Bitmap MapRight { get; set; }
        Direction Dir { get; set; }

        protected override Image GetImage()
        {
            Bitmap bitmap = null;
            switch (Dir)
            { 
                case Direction.Left:
                    bitmap = MapLeft;
                    break;
                case Direction.Right:
                    bitmap = MapRight;
                    break;
                case Direction.Up:
                    bitmap = MapUp;
                    break;
                case Direction.Down:
                    bitmap = MapDown;
                    break;
                default:
                    bitmap = MapUp;
                    break;
            }
            bitmap.MakeTransparent(Color.Black);
            return bitmap;
        }
    }
}
